from appium.webdriver.common.mobileby import MobileBy

from test_lubo.app_PO4.page.base_page import BasePage


class EditMemberPage(BasePage):
    def edit_contact(self,name,phone):
        #输入姓名、手机号等信息，然后点击保存
        from test_lubo.app_PO4.page.add_contact_page import AddContactPage
        self.find_and_sendkeys(MobileBy.XPATH, "//*[contains(@text,'姓名')]/../*[@text='必填']",name)
        self.find_and_click(MobileBy.XPATH, "//*[contains(@text,'性别')]/..//*[@text='男']")
        self.find_and_click(MobileBy.XPATH, "//*[contains(@text,'女')]")
        self.find_and_sendkeys(MobileBy.XPATH, "//*[contains(@text,'手机')]/..//*[@text='手机号']",phone)
        self.find_and_click(MobileBy.XPATH, "//*[@text='保存']")
        return AddContactPage(self.driver)




